<%-- 
    Document   : pasajesPaso1
    Created on : 27/05/2014, 06:02:01 PM
    Author     : USUARIO
--%>

<%@page import="java.text.SimpleDateFormat"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE html>
<html>
    <head>
        <meta charset="UTF-8">
        <title>AdminLTE | Dashboard</title>
        <meta content='width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no' name='viewport'>
        <!-- bootstrap 3.0.2 -->
        <link href="../../css/bootstrap.min.css" rel="stylesheet" type="text/css" />
        <!-- font Awesome -->
        <link href="../../css/font-awesome.min.css" rel="stylesheet" type="text/css" />
        <!-- Ionicons -->
        <link href="../../css/ionicons.min.css" rel="stylesheet" type="text/css" />
        <!-- Theme style -->
        <link href="../../css/AdminLTE.css" rel="stylesheet" type="text/css" />
    
        <script type="text/javascript">
            function cambiarP(sel)
            {   if(sel.value == "Ida")
                {   //$("#ida").show();
                    $("#vuelta").hide();
                } else
                {   //$("#ida").hide();
                    $("#vuelta").show();
                }
            }
        </script>
        <script type="text/javascript">
            function mostrarSer()
            {   var ori = $("#pOri").val();
                var des = $("#pDes").val();
                var pTipPas = $("#tipser").val();
                var fecIda = $("#pFecIda").val();
                $("#divSer").load("../../ServletPasajes1?accion=showIti",{ori:ori,des:des,pTipPas:pTipPas,fecIda:fecIda});
            }
        </script>
        
        
    </head>
    <body class="skin-blue">             
        
        <!-- header logo: style can be found in header.less -->
        <%@include file="../../jspf/header.jspf" %>
        <!-- header logo: style can be found in header.less -->
        
        
        <div class="wrapper row-offcanvas row-offcanvas-left">
            <!-- Left side column. contains the logo and sidebar -->
            <aside class="left-side sidebar-offcanvas">                
                <!-- sidebar: style can be found in sidebar.less -->
                <section class="sidebar">
                    <!-- Sidebar user panel -->
                    <div class="user-panel">
                        <div class="pull-left image">
                            <img src="../../img/avatar3.png" class="img-circle" alt="User Image" />
                        </div>
                        <div class="pull-left info">
                            <p>Hello, Jane</p>

                            <a href="#"><i class="fa fa-circle text-success"></i> Online</a>
                        </div>
                    </div>
                    <!-- search form -->
                    <form action="#" method="get" class="sidebar-form">
                        <div class="input-group">
                            <input type="text" name="q" class="form-control" placeholder="Search..."/>
                            <span class="input-group-btn">
                                <button type='submit' name='seach' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
                            </span>
                        </div>
                    </form>
                    <!-- /.search form -->
                    
                    <!-- sidebar menu: : style can be found in sidebar.less -->
                    <%@include file="../../jspf/menu.jspf" %>
                    <!-- sidebar menu: : style can be found in sidebar.less -->
                    
                </section>
                <!-- /.sidebar -->
            </aside>

            <!-- Right side column. Contains the navbar and content of the page -->
            <aside class="right-side">                
                <!-- Content Header (Page header) -->
                <section class="content-header">
                    <h1>
                        Pasajes
                        <small>Mantenedor</small>
                    </h1>
                    <ol class="breadcrumb">
                        <li><a href="#"><i class="fa fa-dashboard"></i> Dashboard</a></li>
                        <li class="active">Pasajes Paso 1</li>
                    </ol>
                </section>

                <!-- Main content -->
                <section class="content">
                    <div class="row">
                        <div class="col-xs-12">
                            <div class="box box-primary">
                                <div class="box-header">
                                    <h3 class="box-title">Mostrar Itinerarios</h3>                                   
                                </div><!-- /.box-header -->
                                <div class="box-body">
                                    <div class="row">
                                        <div class="col-xs-11">
                                            <label class="text-red" style="float:right;">campos obligatorios(*)</label>
                                        </div>                                        
                                    </div>
                                    <div class="row">
                                        <div class="col-xs-3">
                                            <label class="text-red">*</label>&nbsp;<label>Origen</label>
                                            <select class="form-control" name="pOri" id="pOri">
                                                <option>Elegir origen..</option>
                                                <% ModIti_Agencias a = new ModIti_Agencias();
                                                   ArrayList<ModIti_Agencias> listA = new ArrayList<ModIti_Agencias>();
                                                   listA = a.listarAgencias();
                                                   for(int i=0; i<listA.size(); i++)
                                                   {
                                                %>
                                                <option><%=listA.get(i).getCiudad()%></option>                                                 
                                                <%
                                                   }
                                                %>
                                            </select>
                                        </div>
                                        <div class="col-xs-3">
                                            <label class="text-red">*</label>&nbsp;<label>Destino</label>
                                            <select class="form-control" name="pDes" id="pDes">
                                                <option>Elegir destino..</option>
                                                <% ArrayList<ModIti_Agencias> listA2 = new ArrayList<ModIti_Agencias>();
                                                   listA2 = a.listarAgencias();
                                                   for(int i=0; i<listA2.size(); i++)
                                                   {
                                                %>
                                                <option><%=listA.get(i).getCiudad()%></option>                                                 
                                                <%
                                                   }
                                                %>
                                            </select>
                                        </div>
                                        <div class="col-xs-3">
                                            <label class="text-red">*</label>&nbsp;<label>Tipo de servicio</label> 
                                            <select class="form-control" id="tipser" onchange="cambiarP(this)" name="pTipPas">
                                                <option value="Ida">Solo Ida</option>
                                                <option value="IdayVuelta">Ida y Vuelta</option>
                                            </select>
                                        </div>
                                    </div><br/>
                                    <div class="row" id="ida">
                                        <div class="col-xs-3">
                                            <label class="text-red">*</label>&nbsp;<label>Fecha de Ida</label>
                                            <input type="date" class="form-control" id="pFecIda" name="pFecIda" required/>
                                        </div>
                                        <div class="col-xs-3" id="vuelta" style="display:none;">
                                            <label class="text-red">*</label>&nbsp;<label>Fecha de Regreso</label>
                                            <input type="date" class="form-control" id="pFecReg" name="pFecReg"/>
                                        </div>
                                    </div><br/>
                                    <div class="row">
                                        <div class="col-xs-5">
                                            <label>&nbsp;</label>
                                        </div>
                                        <div class="col-xs-2">
                                            <button type="button" class="btn btn-primary" onclick="mostrarSer()">Mostrar Itinerarios</button>
                                        </div>
                                    </div><br/>
                                    <div class="row">
                                        <div class="col-xs-6">
                                            <h4 class="bg-navy pad" style="margin-bottom:5px;">Ida xx/xx/xxxx</h4>
                                            <div id="divSer">

                                            </div>
                                        </div>
                                        <div class="col-xs-6">
                                            <h4 class="bg-navy pad" style="margin-bottom:5px;">Vuelta xx/xx/xxxx</h4>  
                                             <div id="divSerVue">

                                             </div> 
                                        </div>
                                    </div>                                      
                                </div><br/>
                                <div class="row">
                                    <div class="col-xs-5">
                                        <label>&nbsp;</label>
                                    </div>
                                    <div class="col-xs-6">
                                        <a href="pasajesPaso2.jsp">
                                            <button type="submit" class="btn btn-primary">Siguiente >></button>
                                        </a>
                                    </div>
                                </div><br/>
                            </div>
                        </div><!-- /.box -->
                    </div> 
                </section><!-- /.content -->
            </aside><!-- /.right-side -->
        </div><!-- ./wrapper -->


        <!-- jQuery 2.0.2 -->
        <script src="../../js/jquery.min.js"></script>
        <!-- Bootstrap -->
        <script src="../../js/bootstrap.min.js" type="text/javascript"></script>
        <!-- AdminLTE App -->
        <script src="../../js/app.js" type="text/javascript"></script>
    </body>
</html>